Programming with QuickTime VR

| Previous | Chapter contents | Chapter top | Section top | Next |

QTVRGetBackBufferMemInfo

QuickTime VR maintains an internal back buffer for caching panoramic images. You can use the QTVRGetBackBufferMemInfo function to get information about the size of the back buffer that would be required for caching a panoramic image of a specified pixel format. See "Pixel Formats" for more information.

OSErr QTVRGetBackBufferMemInfo (
                     QTVRInstance qtvr,
                     UInt16resolution,
                     UInt32 cachePixelFormat,
                     SInt32*minCacheBytes,
                     SInt32*suggestedCacheBytes,
                     SInt32*fullCacheBytes);
qtvr
An instance of a QuickTime VR movie.
resolution
The index, in the resolution bitmask returned by QTVRGetAvailableResolutions , of the desired image resolution.
cachePixelFormat
The desired pixel format for the back buffer. This value should be one of the defined pixel formats . See "Pixel Formats" for more information.
minCacheBytes
On entry, a pointer to a long integer. On exit, that long integer is set to the minimum size, in bytes, of the back buffer required to display the specified panorama with a severely limited maximum field of view. Set this parameter to nil to prevent this information from being returned.
suggestedCacheBytes
On entry, a pointer to a long integer. On exit, that long integer is set to the minimum size, in bytes, of the back buffer required to display the specified panorama with full wide-angle zooming. Set this parameter to nil to prevent this information from being returned.
fullCacheBytes
On entry, a pointer to a long integer. On exit, that long integer is set to the minimum size, in bytes, of the back buffer required to have the entire panorama in memory at once. That is the default size of the panorama back buffer. Set this parameter to nil to prevent this information from being returned.
function result
A result code.

DESCRIPTION

The QTVRGetBackBufferMemInfo function returns information about the size of the back buffer that would be required to hold some or all of the panoramic image associated with the movie specified by the qtvr parameter. This is a "what-if" function: you specify a resolution and a pixel format, and QTVRGetBackBufferMemInfo returns several buffer sizes. You can use this information, in conjunction with the QTVRSetBackBufferPrefs function, to exercise some control over the size of the back buffer.

The resolution at which an image is to be displayed is specified by the resolution parameter, which is an index into the resolution bitmask returned by the QTVRGetAvailableResolutions function. Relative to that resolution and the pixel depth determined by the cachePixelFormat parameter, the QTVRGetBackBufferMemInfo function returns, through the minCacheBytes parameter, the minimum size of the buffer needed to display the movie. Using a buffer of that size, however, may result in a severely limited maximum field of view. You can call the QTVRGetViewingLimits function to determine the actual maximum field of view.

To allow full wide-angle zooming, you should use a buffer whose size is specified by either the suggestedCacheBytes parameter or the fullCacheBytes parameter.

SPECIAL CONSIDERATIONS

QTVRGetBackBufferMemInfo is valid only for panoramic nodes.


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |